package emulator.support;

import emulator.hardware.HwByte;
import emulator.hardware.HwWord;
import emulator.util.MemoryPtr;

public class AbsoluteOperandEval implements OperandEval {

	MemoryPtr instruction;
	
	public AbsoluteOperandEval(MemoryPtr ptr) {
		instruction = ptr;
	}

	@Override
	public String getDetails(CpuState cpu_state) {
		int operand = instruction.getWordOp();
		instruction.setAddress(operand);
		return "($" + new HwWord(operand) + ") -> $" + new HwByte(instruction.getByteOp());
	}

}
